//package com.ruoyi.system.mqtt;
//
//import lombok.extern.slf4j.Slf4j;
//import org.eclipse.paho.client.mqttv3.MqttClient;
//import org.eclipse.paho.client.mqttv3.MqttException;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Component;
//
//import java.util.List;
//
//@Component
//@Slf4j
//public class MqttTopicSubscriber {
//
//    private final MqttClient mqttClient;
//
////    @Value("${mqtt.topics}")
//    private String topics;
//
//    public MqttTopicSubscriber(MqttClient mqttClient, String topics) {
//        this.mqttClient = mqttClient;
//        this.topics = topics;
//    }
//
//    public void subscribeTopics() throws MqttException {
//        mqttClient.subscribe(topics);
//        log.info("Subscribed to topic: " + topics);
////        for (String topic : topics) {
////            mqttClient.subscribe(topic);
////            log.info("Subscribed to topic: " + topic);
////        }
//    }
//}
//
//
//
